﻿using System.Windows;
using Luminescence.Xiph;
using Microsoft.Win32;

namespace XiphTestGui
{
   public partial class Window1 : Window
   {
      public Window1()
      {
         InitializeComponent();

         btnOpen.Click += new RoutedEventHandler(btnOpen_Click);
      }

      private void btnOpen_Click(object sender, RoutedEventArgs e)
      {
         OpenFileDialog open = new OpenFileDialog();
         open.Filter = "Fichiers FLAC (*.flac)|*.flac";

         if (!open.ShowDialog().Value) return;

         txtPath.Text = open.FileName;

         FlacTagger flac = new FlacTagger(open.FileName);
         DataContext = flac;
      }
   }
}